Conversation
56c001e to
7531337
Compare
|
Note to self: I was probably incorrect in that we do not use the namespace feature, seems like we do, at least here: https://github.com/alephdata/aleph/blob/develop/ui/src/react-ftm/components/common/EntityManager.ts#L68 Open question is whether it’s necessary as the backend (re-)applies namespaces anyway. |
The FtM TS library relies on the Node.js `crypto` module (which isn’t available in browsers) in order to implement [namespace signatures](https://github.com/alephdata/followthemoney/blob/main/js/src/namespace.ts). The `crypto-browserify` polyfill is quite big and there were a few questions around continued maintenance of that project, so it would be good to remove it as an dependency. I initially planned to update the namespacing implementation in the TS lib with the Web Crypto API which is available Node.js and browsers, but this would require breaking changes to the TS API as the Web Crypto API is async. However, as far as I can see we do not actually rely on the TS implementation of namespaces in the UI, so we should be able to drop the polyfill without any further changes to the TS lib.
7531337 to
62ba6c3
Compare
|
Confirmed that creating entities in the table editor, network diagrams, and lists errors if the |
|
For future reference: This is a problem at least in network diagrams. Here’s what happens when you create a new entity in a network diagram:
The layout references the namespaced entity ID. However, we do not compute the namespaced ID on the client anymore, only the raw ID. I see multiple possibilities to solve this (but don’t have time to pursue either of them atm).
Footnotes
|
The FtM TS library relies on the Node.js
cryptomodule (which isn’t available in browsers) in order to implement namespace signatures. Thecrypto-browserifypolyfill is quite big and there were a few questions around continued maintenance of that project, so it would be good to remove it as an dependency.I initially planned to update the namespacing implementation in the TS lib with the Web Crypto API which is available Node.js and browsers, but this would require breaking changes to the TS API as the Web Crypto API is async.
However, as far as I can see we do not actually rely on the TS implementation of namespaces in the UI, so we should be able to drop the polyfill without any further changes to the TS lib.